package com.xujl.mvcbind.ui.form.control;

import android.os.Bundle;
import android.view.View;

import com.xujl.fastlib.base.BaseFragment;
import com.xujl.mvcbind.R;
import com.xujl.mvcbind.ui.form.model.UserInfoFragmentModel;
import com.xujl.mvcbind.ui.form.view.UserInfoFragmentView;

/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   : 用户信息
 *     version: 1.0
 * </pre>
 */

public class UserInfoFragmentControl extends BaseFragment<UserInfoFragmentModel, UserInfoFragmentView> {
    public static UserInfoFragmentControl newInstance () {
        Bundle args = new Bundle();
        UserInfoFragmentControl fragment = new UserInfoFragmentControl();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void init (Bundle savedInstanceState) {

    }

    @Override
    public void onClick (View view) {
        super.onClick(view);
        switch (view.getId()) {
            case R.id.btn_get:
                mView.bindData(com.xujl.mvcbind.BR.bean, mModel.getUserInfoBean());
                break;
            case R.id.btn_save:
                mModel.saveUserInfo();
                break;
            default:

                break;

        }
    }
}
